package cn.com.cifi.mars.constant;

import java.util.ArrayList;
import java.util.List;

/**
 * @Author: ztz
 * @Date: 2020/11/17 15:35
 * 三大业态
 */
public enum BigStandardFormatsEnum {
    RESIDENCE("101", "住宅"),
    OTHER("105", "其他"),
    BUSINESS_VILLA_LIST("102", "商业"),
    PARKING("103", "车位");
    private String key;
    private String value;

    BigStandardFormatsEnum(String key, String value) {
        this.key = key;
        this.value = value;
    }

    public static String getValueByKey(String key){
        for(BigStandardFormatsEnum e:BigStandardFormatsEnum.values()){
            if(key.equals(e.getKey())){
                return e.getValue();
            }
        }
        return  null;
    }

    public static List<String> getkeyList(){
        List<String> keyList = new ArrayList<>();
        for(BigStandardFormatsEnum e : BigStandardFormatsEnum.values()){
            keyList.add(e.getKey());
        }
        return keyList;
    }

    public String getKey() {
        return key;
    }

    public String getValue() {
        return value;
    }
}
